import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}
class HomeContent extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(
      child:Container(
        child: Text(
          "我是文本",
          textAlign: TextAlign.center,
          overflow: TextOverflow.ellipsis,
          maxLines: 1,
          style:TextStyle(
            fontSize: 16.0,
            
          ),
          ),
        width: 300.0,
        height: 300.0,
        decoration: BoxDecoration(
          color: Colors.green,
          border: Border.all(
            color: Colors.red,
            width: 1.0
          ),
          borderRadius: BorderRadius.all(
            Radius.circular(8)
          )
        ),
        // padding: EdgeInsets.all(10)
        padding: EdgeInsets.fromLTRB(8, 8, 7, 9),
        //transform: Matrix4.translationValues(100, 0, 0),//平移
        // transform: Matrix4.rotationZ(0.3), //绕着Z轴旋转
        transform: Matrix4.diagonal3Values(1.2, 1,1), //缩放
        alignment: Alignment.bottomCenter, //alignment,元素显示位置
      )
    );
  }
}
class MyApp extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
  
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("有点麻烦"),
        ),
        body: HomeContent(),
      ),
    );
  }
}
